<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DeSpot Plugin for Avisynth</title>
<link rel="stylesheet" type="text/css" href="../../avisynth.css">
<!--
Automatically generated, don't change:
$Id: despot.htm,v 1.7 2006/12/15 19:29:25 fizick Exp $
-->
</head>

<body>
<h1>DeSpot</h1>
<h2>Abstract</h2>
<b>author:</b>  Alexander G. Balakhnin aka Fizick<br>
<b>version:</b>      3.5.0 (based on Conditional Temporal Median Filter)<br>
<b>download:</b>  <a href="http://bag.hotmail.ru/">http://bag.hotmail.ru/</a><br>
<b>category:</b>   Broadcast Video Plugins<br>
<b>requirements:</b>
<ul>
  <li>YV12 Colorspace</li>
  <li>ISSE support</li>
</ul>
<hr>
<h4>DeSpot - Conditional Temporal Spot Removing Filter</h4>
<p>This filter is designed to remove temporal noise in the form of dots (spots) and streaks found in some videos.
The filter is also useful for restoration (cleaning) of old telecined  8mm (and other) films
from spots (from dust) and some stripes (scratches).</p>
<p>The plugin is based on Conditional Temporal Median Filter v.0.93 (C-plugin  for Avisynth 2.5)<br>
by Kevin Atkinson <a href="http://kevin.atkinson.dhs.org/temporal_median/"> http://kevin.atkinson.dhs.org/temporal_median/</a><br>
(This document is also based on his doc.)</p>
<h3>Example images</h3>
<p>One half frame from my old 8mm film (top - before, bottom -after the filter):</p>
<p><img border="0" src="../pictures/externalfilters/despot1.jpg" width="720" height="576"></p>
<p> Avisynth script for this example, which show work of old base filter version 0.93, but adapted to for new version 3.2.</p>
<pre>AviSource(&quot;film8mm.avi&quot;)
LoadPlugin(&quot;despot.dll&quot;)
ConvertToYV12()
Crop(0,0,720,288) #to show test
i = last
# Compare half-frames with and without noise reduction
DeSpot(p1=35, p2=14, pwidth=70, pheight=70, mthres=25, mwidth=20, mheight=15, interlaced=false,
  \  merode=33, ranked=false, p1percent=0, dilate=false, fitluma=false, blur=0, motpn=false, seg=0)
StackVertical(i, last)</pre>
<p>The same frame after some parameters using  from more new filter version 1.0 (top half - with spot border blur, bottom half - with temporal smoothing in static areas):</p>
<p><img border="0" src="../pictures/externalfilters/despot2.jpg" width="720" height="576"></p>
<p>Avisynth script for this example :</p>
<pre>AviSource(&quot;film8mm.avi&quot;)
LoadPlugin(&quot;despot.dll&quot;)
ConvertToYV12()
Crop(0,0,720,288)
# Compare frames with blur, and with and without temporal noise reduction
i = last
# Compare half-frames with and without noise reduction
b = DeSpot(i, p1=35, p2=14, pwidth=70, pheight=70, mthres=25, mwidth=20, mheight=15, interlaced=false,
  \  merode=33, ranked=false, p1percent=0, dilate=false, fitluma=false, blur=4, motpn=false, seg=0)
t = DeSpot(i, p1=35, p2=14, pwidth=70, pheight=70, mthres=25, mwidth=20, mheight=15, interlaced=false,
  \  merode=33, ranked=false, p1percent=0, dilate=false, fitluma=false, blur=4, motpn=false, seg=0, tsmooth=3)
StackVertical(b, t)</pre>
<p>Some new parameters are introduced in new filter versions, for more correct spot detection and artifacts-free spot removing.</p>
<h3>Needed software</h3>
<ol>
  <li>The program is plugin (filter) for free  Avisynth 2.5  (http://www.avisynth.org).
    Tested with versions 2.53 and 2.55. Version 2.54 also may be used.</li>
  <li>Old filter versions prior 2.0 (up to last 1.3) were is needed in Avisynth C Interface (avithynth_c.dll) by Kevin Atkinson.
    There were some problems with it.</li>
  <li>New filter since version 2.0 is native Avisynth plugin and is NOT needed in C-interface.</li>
</ol>
<h3>USAGE</h3>
<p>DeSpot may be loaded as any Avisynth plugin, or by putting it in the Plugins directory or by using LoadPlugin.
Basic Usage:</p>
<pre>AviSource(&quot;d:\video.avi&quot;)  # the input MUST be YV12
LoadPlugin(&quot;despot.dll&quot;)
ConvertToYV12()
DeSpot(p1=35, p2=14, mthres=25)</pre>
<p>The filter may work in 2 main modes, switched by parameter <var>median</var> (since version 2.0):<br>
<var>median</var> (true or false, default = false),<br>
false - Spots removing mode -  filter will attempt to identify noise and eliminate it.<br>
true - Simple Median mode - filter will apply a simple temporal median filter to the
non-moving areas of the image.</p>
<p>Function calling syntax:</p>
<p><code>DeSpot</code>(<var>clip, int mthres, int mwidth, int mheight,
int merode, bool interlaced, bool median, int p1, int p2, int pwidth,
&nbsp;int pheight, bool ranked, int sign, int maxpts, int p1percent,
int dilate, bool fitluma, int blur, int tsmooth, int&nbsp;show, int
mark_v, bool show_chroma, bool&nbsp;motpn, int seg, bool color, int
mscene, int minpts, clip "extmask"</var>)</p>
<h4>Parameters for DeSpot in spots removing mode are any of the following:</h4>
<p><var>p1</var> (default 24)<br>
<var>p2</var> (default 12)<br>
    A pixel needs to be at different from its neighbors by at least 'P1' in order for it to be considered noise. The surrounding pixels must
be different by at lease 'P2' in order for the pixel to be considered part of the same spot.</p>
<p><var>pwidth</var> (default 6)<br>
<var>pheight</var> (default 5)<br>
    A spot can be no larger than <var>pwidth x pheight</var></p>
<p><var>ranked</var> (true or false, default=true)<br>
Enables ranked ordered difference spot detector with 6 points instead of 2.</p>
<p><var>sign</var> (default 0)<br>
    Set mode for removing of only black or white spots or both:<br>
sign = 0 - any spots and outliers (default)<br>
sign = 1 - only black (dark) spots and outliers<br>
sign = -1 - only white (light) spots and outliers<br>
sign = 2 - only black (dark) spots, any outliers<br>
sign = -2 - only white (light) spots, any outliers</p>
<p><var>maxpts</var> (from 0 to 10000000, default=0 -   no limit)<br>
Set upper limit of points (pixels) per every spot.</p>
<p><var>minpts</var> (from 0 to 10000000, default=0 -   no limit)<br>
Set lower limit of points (pixels) per every spot.</p>
<p><var>p1percent</var> (from 0 to 100, default=10)<br>
Set lower limit of relative fracture of high-contrasted (by criterion P1) pixels per spot (in percent).</p>
<p><var>dilate</var> (from 0 to 255, default=1)<br>
Set range of  morphological dilate (growing) of  removed spots (in pixel units).<br>
<br>
<var>fitluma</var> (true or false, default=true)<br>
    Enables some frame luminosity correction in places of deleted spots</p>
<p><var>blur</var> (from 0 to 4, default 1)<br>
    Value (length) of local spatial blur near borders of deleted spots<br>
<br>
<var>tsmooth</var> (from 0 to 127, default 0)<br>
    Control temporal smoothing in static areas (except spots and motion).<br>
Set approximate threshold of pixel luma variance in 3 frames,<br>
The more variance exceed this threshold, the less temporal smoothing.<br>
0 - no temporal smoothing.</p>
<p><var>motpn</var> (true or false, default = true)<br>
Define motion detecting method.<br>
false - detect motion from previous to current and from current to next frame (old method used in all versions before 3.0)<br>
true - detect motion from previous to next frame (new method since version 3.0)</p>
<p><var>seg</var> (from 0 to 2, default=2)<br>
Control spots segments removing method.<br>
0 - remove only spots pixels which has no overlap with motion zones (old method used in all versions before 3.0, most strong removing);<br>
1 - remove only spots line segments which has no any overlap with motion zones;<br>
2 - remove only whole spots which has no any overlap with motion zones (most safe).</p>
<p><var>color</var> (true of false, default = false)<br>
Control color correction  at place of removed spots .<br>
true - change color of pixels at places of removed spots to mean value previous, current and next frames,<br>
false - not change color of pixels at places of detected spots.</p>
<p><var>mscene</var> (from 0 to 100, default=40)<br>
Set percent of pixels in motion for scenechange detection and disabling of frame spot removal</p>
<p><var>extmask</var> (default none)<br>
Optional external mask clip. It will be binarized with threshold 127 and logically added (by "OR" operation) 
to internal motion mask. 
It can be used for additional protection of good objects (if you have some reliable mask). 
</p>
<h4>Parameters of DeSpot for both spots removing and median modes are:</h4>
<p><var>mthres</var> (default 16)<br>
    A pixel needs to be different from the another frame by at least 'MTHRES' in order to be considered moving. This number should
be larger than 'P2' in order to prevent noise from being identified as motion.</p>
<p><var>mwidth</var> (default 7)<br>
<var>mheight</var> (default 5)<br>
    These define the width and height of block for motion map denoising algorithm (erode and dilate stages).</p>
<p><var>merode</var> (default = 33)<br>
    These define a threshold value of percent of motion pixels in the block at erode stage.</p>
<p><var>interlaced</var> (true or false)<br>
    Whether to treat the video as interlaced or not (progressive). The default is progressive for DeSpot since version 1.3.
(In older versions, the Field based video was processed as interlaced by default - it was a bug).</p>
<p>&nbsp;&nbsp;&nbsp;To instead spots removing, show a motion map and noise that would of been eliminated, use parameter:<br>
<var>show</var> (0, 1, 2, default=0)<br>
0 - not show,<br>
1 - to highlight the noise instead of removing it<br>
2 - show a motion map and noise</p>
<p>&nbsp;&nbsp;&nbsp;If <var>show</var>=1, you may use additional parameter to change marks color and brigthness,<br>
<var>mark_v</var> (0 to 255, default= 255)<br>
    Where <var> mark_v</var> is the luma value to highlight the noise with.<br>
The color (pink, green or grey) of noise spot now is depend from parity of <var>mark_v</var>.<br>
Motion map is also shown.</p>
<p>If <var>show</var>=2, the luma is changed as follows:<br>
255 (White): Noise that will be removed<br>
159: Noise that won't be remove because it might be motion<br>
95: Motion map for the current image</p>
<p><var>show_chroma</var> (true or false)<br>
 Use to show clip color data on motion map.</p>
<h3>TUNING THE PARMS</h3>
<p>In order for the filter to work right the various parameters MUST be set correctly. There is no good default values.</p>
<p>The first parameter that needs to be set is <var>interlaced</var>, set it to true
if your video is interlaced, false otherwise.</p>
<p>Than <var>pwidth</var> and <var>pheight</var> need to be set. Set these to be slightly
larger than the specks you want to eliminate. If your video is interlaced than height represents the height of an individual field.
Thus, it will essentially be doubled.</p>
<p>Than <var>p1</var>, <var>p2</var>, and <var>mthres</var> need to be set. In general, <var>p1 > mthres > p2</var>.
If these are set too low than you may lose detail as small pixel variations might be mistaken as specks, thus losing detail, and more
importantly, real specks might not be recognized as the size of the filter thinks the spec is might be larger than <var>pwidth</var> by <var>pheight</var>.
<var>show</var>=1 or 2 might be helpful in setting these parameters.</p>
<p>The <var>mwidth</var>, <var>mheight</var> parameters define the range of motion zones influence
on noise (spots) zones. For decreasing of false spot detecting for fast motion scenes,
you may increase these. After that, to cancel the influence of very small motion zones,
you may increase the <var>merode</var> parameter (relative) .</p>
<p>Than <var>sign</var> may be set, if almost all spots are only white or only black.
Correct tuning reduces number of false spot detections and artifacts.</p>
<p>I recommend to use new parameter <var>ranked</var>=true for stability of spots detection in noisy video.</p>
<p>Use parameter <var>maxpts</var> as another method (in addition to <var>pwidth</var> and
<var>pheight</var>) to  avoid cleaning too large objects - probably not spots.</p>
<p>Use <var>p1percent</var> to not clean  weak (small contrast) spots with small relative fracture
of strong points (with <var>p1</var> threshold).</p>
<p>For better removing of partially damaged pixels near non-sharp spots edges, you may increase spots sizes by increasing of
<var>dilate</var> parameter.</p>
<p>Enable brightness correction in spaces of deleted spots by parameter <var>fitluma</var>.</p>
<p>This correction is local (line segment based) in <var>seg</var>&gt;0  mode and must be used
with properly defined dilated spots to prevent false correction due to non-sharp spots edges.</p>
<p>To reduce noticeability of some borders in places of deleted spots some more,
tune local spatial smoothing by parameter <var>blur</var>.</p>
<p>For denoising of almost static areas, try to use temporal smoothing, with <var>tsmooth</var> parameter about 4-8.</p>
<p>If spots have some color, try enable<var> color</var> parameter to correct spots color.</p>
<p>To prevent artifacts at scene change, decrease <var>mscene</var> parameter.</p>
<p>You also may try to use external mask clip (<var>extmask</var> parameter) in addition to (or instead of) internal motion mask
to protect good objects. For example, it can be motion mask or inverted SAD mask from MVTools plugin.</p>
<h3>HOW IT WORKS</h3>
<h4>The filter works in Denoise mode as follows:</h4>
<p>1a) Find pixels that are different from its neighbors by at least <var>p1</var>.<br>
If <var>ranked</var> parameter is true (new method from version 1.2), the 3 neighbors in previous frame (x-1, x, x+1)
and same 3 neighbors in next frame are ranked (ordered by value), and those min and max are used for luma difference calculation for current pixel (x).<br>
    If <var>ranked</var> parameter is false (old method),&nbsp;the only 1 neighbor in previous frame (at same position x)
and 1 neighbor in next frame are used for min and max calculation,<br>
    If <var>sign</var> parameter is not 0, the sign of difference is also taken into account.<br>
    These pixels are merged to horizontal line segments.<br>
Stacked line segments are merged to spots.</p>
<p>1b) Enlarge outliers based on difference <var>p2&lt;p1</var>.</p>
<p>2a) Determine the size of the specks and reject (will not clean) all those larger than <var>pwidth x pheight</var>.<br>
If <var>numpts</var> parameter is set, the big spots are rejected also.<br>
If <var>p1percent</var> parameter is set, then weak (by criterion <var>p1</var>) spots, which mostly consist of outliers (by criterion <var>p2</var>), are rejected also.</p>
<p>2b) If <var>Dilate</var> mode set, than spots are dilated to cover its non-contrast edges
and close small gaps between its, by applying a morphological dilate operation to noise (spots) map.</p>
<p>3a) Find moving areas of an image by simply comparing each pixel to the another frame and considering all those which
are greater than <var>mthres</var>.<br>
    If <var>motpn</var>=false, it is defined from previous to current frame,<br>
if <var>motpn</var>=true, it is defined from previous to next frame.</p>
<p>3b) Mark motion pixels without noise with weight 3 in the motion map.<br>
If <var>motpn</var>=false, mark pixels determined both noise and motion as weight 1 in the motion map.</p>
<p>4) Denoise the motion map by constrained erosion and then dilating (as a whole it is morphological opening operation).<br>
During erode phase, the motion map is eroded with range <var>mwidth</var>/2 and <var>mheight</var>/2,
and zones with small summary weight (less than 3*<var>merode</var>/100)  are decreased or completely removed from motion map. Such zones correspond to
small relative (in percent) numbers of motion neighbors within this range (or mostly noisy pixels -spots).<br>
During dilate phase,&nbsp; remained motion zones are enlarged with same range. These are probably the most important steps (especially for <var>motpn</var>=false) .</p>
<p>4a) If percent of pixels in motion is more than  <var>mscene</var> parameter, the plugin detects scenechange, and whole motion map is set as motion.</p> 
<p>4b) Add optional external mask to motion mask.</p> 
<p>5) Only remove the specks in which there was no motion (in the current frame or  next frame if <var>motpn</var>=false).<br>
    In pixel removing mode (<var>seg</var> = 0), test and reject all noise candidate pixels which has overlap with motion zones,
rest candidates will be removed.<br>
In segment removing mode (<var>seg</var> = 1), test and reject all noise candidate segments which has any overlap with motion zones,
rest segments will be removed.<br>
In segment removing mode (<var>seg</var> = 2), test and reject all noise candidate spots which has any overlap with motion zones,
rest spots will be removed. It is the most safe mode, with minimum artifacts false removing</p>
<p>6) Optional  make luma correction in place of removed pixels and spatial smoothing near spot edges.</p>
<p>7) Optional make temporal smoothing of static areas.</p>
<p>8) Optional correction of color at place of spots.</p>
<h4>The filter can also be configured to work as follows (Simple Median mode):</h4>
<p>1) Find moving areas of an image by simply comparing each pixel to the previous frame and considering all those which
are greater than <var>mthres</var>.</p>
<p>2) Denoise the motion map by erosion and then dilating (i.e. morphological opening).
This is probably the most important step.</p>
<p>3) Apply a simple temporal median filter on the non-moving areas of the image.</p>
<h3>OPTIMIZATION NOTES</h3>
<p>DeSpot since version 3.2 is  optimized by hand for Integer SSE (Pentium3, Athlon is needed now).<br>
Speed increasing up to about 30%.</p>
<h3>COMPILING</h3>
<p>Fizick's version above 1.1 is compiled by free MS VC++ Toolkit 2003 with MS Platform SDK.</p>
<p>Note: copy lost nmake.exe and cvtres.exe from Bin\win64 dir to Bin dir.</p>
<p>MS VC6, VC7 also may be used.</p>
<p>Use make file "makefile" with command: nmake</p>
<p>Old versions of the C-plugin up to 1.3 may be compiled with GCC-g++ 3.3.1, MinGW 3.0.0-1, MSYS 1.09. New versions above 2.0 can not be compiled so.</p>
<h3>COMBINED USAGE</h3>
<p>Very good results are may be obtained with combined this filter with motion estimation and compensation:
global motion with <a href="depan.htm">DePan</a> plugin (by Fizick), or local motion with
<a href="mvtools.htm">MVTools</a> plugin (by Manao).</p>
<p>In this case the pixels from previous and next frames  are moved to best fit to current frame,
therefore relative motion is decreased, false spots detection is decreased, and noise reduction is increased.</p>
<p>Example script with DePan 0.9 (you may tune optional DePanEstimate and DepanInterleave
parameters):</p>
<pre>AviSource(&quot;h:\kino.avi&quot;)
LoadPlugin(&quot;depan.dll&quot;)
LoadPlugin(&quot;despot.dll&quot;)
i = ConvertToYV12()
d = DePanEstimate(trust=3)
DePanInterleave(i, data=d)
DeSpot(p1=30, p2=15, pwidth=800, pheight=600, mthres=20, motpn=true, dilate=1, seg=1)
SelectEvery(3, 1)</pre>
<p>Example script with MVTools 0.95 (you may tune optional MVAnalyse parameters):</p>
<pre>AviSource(&quot;h:\kino.avi&quot;)
LoadPlugin(&quot;mvtools.dll&quot;)
LoadPlugin(&quot;despot.dll&quot;)
i = ConvertToYV12()
vf = MVAnalyse(i, isb=false, lambda=2000)
f = MVCompensate(i, vf)
vb = MVAnalyse(i, isb=true, lambda=2000)
b = MVCompensate(i, vb)
Interleave(f, i, b)
DeSpot(p1=30, p2=12, mthres=20, dilate=2, fitluma=true, blur=2, seg=2)
SelectEvery(3,1)</pre>
<p>Example script with external mask from MVTools plugin v0.9.13.2 and above
(you may tune optional MVAnalyse parameters):</p>
<pre>
LoadPlugin(&quot;mvtools.dll&quot;)
LoadPlugin(&quot;masktools.dll&quot;)
LoadPlugin(&quot;degrainmedian.dll&quot;)
LoadPlugin(&quot;despot.dll&quot;)

AviSource(&quot;h:\kino.avi&quot;)
i = ConvertToYV12()
prefilt=i.DeGrainMedian() # prefiltered for better motion analysis

# analyse and compensate motion forward and backward (to current frame)
ml = 100     # mask scale
thscd1 = 400 # scene change

vf = prefilt.MVAnalyse(isb=false, truemotion=true) # forward vectors 
cf = i.MVFlow(vectors=vf, thscd1 = thscd1) # previous compensated forward
sadf = MVMask(vectors=vf, ml=ml,kind=1,gamma=1, thscd1 = thscd1) # forward SAD mask
msadf=sadf.Binarize() # binary inverted forward SAD mask

vb = prefilt.MVAnalyse(isb=true, truemotion=true)  # backward vectors 
cb = i.MVFlow(vectors=vb, thscd1 = thscd1) # next compensated backward 
sadb = MVMask(vectors=vb, ml=ml, gamma=1, kind=1, thscd1 = thscd1) # backward SAD mask
msadb = sadb.Binarize() # binary inverted backward SAD mask

msad = Logic(msadf,msadb,"OR") # combined inverted SAD mask
msad = msad.Expand() # expanded inverted SAD mask
msadi = Interleave(msad, msad, msad) # interleaved 3-frame inverted SAD mask
# This mask is high (255) where at least one motion estimation is good, 
# so these areas will be protected

Interleave(cf,i,cb) # interleave forward compensated, source, and backward compensated

DeSpot(p1=30,p2=12,pwidth=800,pheight=600,mthres=20,merode=33,\
   sign=0,show=1,seg=0,color=true,motpn=true, extmask=msadi)

SelectEvery(3,1) # get filtered source
</pre>
<h3>ADDITIONAL INFO</h3>
<p>Discussion of ConditionalTemporalMedian filter and Despot filter :
<cite><a href="http://forum.doom9.org/showthread.php?s=&amp;threadid=59388">http://forum.doom9.org/showthread.php?s=&amp;threadid=59388</a></cite></p>
<h3>LICENSE</h3>
<p>This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or (at your option) any later version.</p>
<p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
<p>You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</p>
<h3>VERSIONS CHANGES LOG</h3>
<ul>
  <li>Version 3.5.0 (July 14, 2006):
    <ul>
      <li>Corrected documentation example (msadb). Thanks to johnmeyer for report.</li>
    </ul>
  </li>
  <li>Version 3.5 (November 26, 2005):
    <ul>
      <li>Added external motion mask clip option and example.</li>
      <li>Changed default <var>motpn</var>=true (was really false, contrary to documentation).</li>
    </ul>
  </li>
  <li>Version 3.4.0 (June 18, 2005):
    <ul>
      <li>Reformatted doc.</li>
    </ul>
  </li>
  <li>Version 3.4 (April 11, 2005):
    <ul>
      <li>Added parameter <var>minpts</var>.</li>
    </ul>
  </li>
  <li>Version 3.3.3 (March 30, 2005):
    <ul>
      <li>Fixed bug with <var>median</var> mode (thanks to slk001 for report).</li>
    </ul>
  </li>
  <li>Version 3.3.2 (March 28, 2005):
    <ul>
      <li>More correct clip cache range (now =2 in place of undefined).</li>
    </ul>
  </li>
  <li>Version 3.3.1 (October 8, 2004):
    <ul>
      <li>Fixed bugs with scene change detection..</li>
    </ul>
  </li>
  <li>Version 3.3 (August 4, 2004):
    <ul>
      <li>Added <var>mscene</var> parameter for scene change detection.</li>
    </ul>
  </li>
  <li>Changes 3.2 (July 4, 2004) from 3.1 (Fizick):
    <ul>
      <li>Corrected enabling and disabling of temporal smooth for some  modes.</li>
      <li>Changed temporal smooth method to more fast but simpler, new tsmooth is similar to old tsmooth*2.</li>
      <li>Restored median mode processing as was before version 3.0.</li>
      <li>Partial  ISSE optimization for speed increasing (Pentium3 or Athlon is needed now).</li>
      <li>Updated doc.</li>
    </ul>
  </li>
  <li>Changes 3.1 (June 27, 2004) from 3.0
(Fizick):
    <ul>
      <li>Added color correction at place of removed spots.</li>
    </ul>
  </li>
  <li>Changes 3.0 (June 22, 2004) from 2.1
(Fizick):
    <ul>
      <li>Version 3.0 is major release update (probably alpha with bugs):</li>
      <li>Added another motion detection method "<var>motpn</var>" (previous to next frame).</li>
      <li>Added segments removing methods "<var>seg</var>"=1,2.</li>
      <li>Changed luma correction to local in segments (spots) removing mode.</li>
      <li>Removed "<var>mratio</var>"  parameter (reset as internal constant =3 as in all versions prior 2.1).</li>
      <li>Changed some defaults.</li>
      <li>Code reorganization.</li>
      <li>Updated doc.</li>
    </ul>
  </li>
  <li>Changes 2.1 (June 14, 2004) from 2.0
(Fizick):
    <ul>
      <li>Added parameter "<var>mratio</var>"  parameter (it was internal =3 in all previous versions).</li>
      <li>Changed default of  "<var>merode</var>" to dependent from "<var>mratio</var>".</li>
      <li>Updated doc.</li>
      <li>At last I begin to understand how the filter works at motion denoising stage  :-).</li>
    </ul>
  </li>
  <li>Changes 2.0 (June 10, 2004) from 1.3
(Fizick):
    <ul>
      <li>Version 2.0 is major release update (probably alpha with bugs):</li>
      <li>Main interface code is rewrited, and now filter is native Avisynth plugin (not C-plugin).</li>
      <li>Added parameter "<var>median</var>"  instead of DeSpotMedian function,</li>
      <li>Added parameter  "<var>show</var>" instead of DeSpotMark, DeSpotMap, DeSpotMedianMap functions.</li>
      <li>Replaced parameter "<var>mp</var>" to parameter "<var>merode</var>" (relative)</li>
      <li>Changed "<var>p1percent</var>" to integer</li>
      <li>Updated doc.</li>
    </ul>
  </li>
  <li>Changes 1.3 (June 7, 2004) from 1.2
(Fizick):
    <ul>
      <li>Removed parameter "<var>weak</var>" ( "<var>p1percent</var>" is more useful).</li>
      <li>Added parameter "<var>Dilate</var>" to enlarge spots.</li>
      <li>Fixed bug with processing field based video as interlaced  by default -
        now default for any source is progressive.</li>
      <li>Changed parameters order to more functional.</li>
      <li>Changed default values of some parameters to more optimal.</li>
      <li>Updated doc.</li>
    </ul>
  </li>
  <li>Changes 1.2 (June 01, 2004) from 1.1
(Fizick):
    <ul>
      <li>Added parameters <var>Ranked, weak, maxpts, p1percent</var>,</li>
      <li>changed mark mode to color spot with weak motion map.</li>
    </ul>
  </li>
  <li>Changes 1.1 (May 31, 2004) from 1.0:
    <ul>
      <li>Source now is compatible with MS VC6, VC7.</li>
    </ul>
  </li>
  <li>Changes 1.0 from 0.934 (Dec 30, 2003)
(Fizick) (not public):
    <ul>
      <li>Added "<var>tsmooth</var>" parameter for temporal smoothing in static areas.</li>
      <li>Changed filter name to DeSpot, filter file name to despot.dll,&nbsp;</li>
      <li>and function names:<br>
ConditionalDenoise to DeSpot,<br>
ConditionalDenoiseMark to DeSpotMark,<br>
ConditionalDenoiseMap to DeSpotMap,<br>
ConditionalMedian to DeSpotMedian,<br>
ConditionalMedianMap to DeSpotMedianMap.</li>
      <li>Corrected info.</li>
    </ul>
  </li>
  <li>Changes 0.934 from 0.93c (Dec 20, 2003)
(Fizick):
    <ul>
      <li>Added "<var>fitluma</var>" and "<var>blur</var>" parameters to reduce noticeability of deleted spots places.</li>
      <li>Remove "<var>per</var>" parameter used previously for that.</li>
      <li>New default value of "<var>mp</var>" parameter.</li>
    </ul>
  </li>
  <li>Changes 0.93c from 0.93b (Nov 30, 2003)
    <ul>
      <li>More short filter name ctmedian.dll</li>
      <li>Added version info to DLL</li>
    </ul>
  </li>
  <li>Changes 0.93d from 0.93b (Nov 13, 2003) (Fizick, non public):
    <ul>
      <li>Added "<var>per</var>" parameter for more smoothed specks perimeter.</li>
    </ul>
  </li>
  <li>Changes 0.93a from 0.93 (Nov 7, 2003) (Fizick, non public):
    <ul>
      <li>Added "<var>sign</var>" parameter for removing only black or white specks.</li>
      <li>non optimized general version only.</li>
    </ul>
  </li>
  <li>Changes 0.93 from 0.92 (Sep 27, 2003)
(Kevin Atkinson)
    <ul>
      <li>Fix another nasty bug.</li>
      <li>Included non optimized version.</li>
      <li>Expanded the manual a bit</li>
    </ul>
  </li>
  <li>Changes 0.92 from 0.91 (Sep 10, 2003)
(Kevin Atkinson)
    <ul>
      <li>Fixed nasty bug.</li>
    </ul>
  </li>
</ul>
<p><kbd>$Date: 2006/12/15 19:29:25 $</kbd></p>
</body>
</html>
